import { setCookie } from '@utils/StorageUtil';
import { Button, message } from 'antd';
import { useNavigate } from 'react-router-dom';

const StudyTrainButton = () => {

    const navigate = useNavigate();

    return (
      <div style={{ textAlign: "center", marginTop: 40 }}>
        <Button
          type="primary"
          size="large"
          style={{
            width: 200,
            height: 50,
            fontSize: 18,
            background: "#1890ff",
            borderColor: "#1890ff",
          }}
          onClick={() => {
            navigate("/study/train/problem");
            setCookie("train", "true");
            //假设选中的科目是线性代数
            setCookie("subjectId", "18db04933646e30ce5b9c723be0ad392");
          }}
        >
          开始学习
        </Button>
      </div>
    );
};

export default StudyTrainButton;